<div class='menu'>
    <div class='menu_item'>
        <a href='/' class='cufon <?=($act=='home')?"active":""?>'>Trang chủ</a>
    </div>
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a class='cufon <?=($act=='tours' || $act=='tour_detail' || $act=='tour_customize')?"active":""?>'>Tours</a>
        <div class='sub_menu'>
        <?
		$cnt = 0;
		$categories = Category::getAllCategories();
		load_menu($categories);
		?>
        	<div class='sub_menu_item'>
            	<a href='/tour-tu-chon/du-lich-da-nang.html'>Tour Tự Chọn</a>
            </div>
        </div>
    </div>
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a href='/khach-san/du-lich-da-nang.html' class='cufon <?=($act=='hotel' || $act=='hotel_detail')?"active":""?>'>Khách sạn</a>
    </div>
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a href='/dich-vu/du-lich-da-nang.html' class='cufon <?=($act=='services' || $act=='transfer')?"active":""?>'>Dịch vụ khác</a>
        <div class='sub_menu'>
            <div class='sub_menu_item'>
                <a href='/phuong-tien/du-lich-da-nang.html'>Phương tiện</a>
            </div>
            <div class='sub_menu_item'>
                <a href='/dich-vu/du-lich-da-nang.html'>Làm - Gia hạn VISA</a>
            </div>
        </div>
    </div>
    
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a href='/tin-tuc/du-lich-da-nang.html' class='cufon <?=($act=='news' || $act=='news_detail')?"active":""?>'>Tin tức</a>
    </div>
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a href='/doi-tac/du-lich-da-nang.html' class='cufon <?=($act=='partner' || $act=='partner_detail')?"active":""?>'>Đối tác</a>
    </div>
    <div class='menu_line'></div>
    <div class='menu_item'>
        <a href='/lien-he/du-lich-da-nang.html' class='cufon <?=($act=='contact')?"active":""?>'>Liên hệ</a>
    </div>
    <div class='frm_search_google'>
        <form action='/search/' method='get' name='frmSearch'>
            <input onClick="if(this.value=='Tìm kiếm ...')this.value='';" onBlur="if(this.value=='')this.value='Tìm kiếm ...';" name="q" type="text" class='txt_search' value="Tìm kiếm ...">
            <input type='submit' name='btn_search' id='btn_search' class='btn_search' value='' />
            <input type="hidden" name="cx" value="002844664735204190259:f5aut0tdcsy" />
            <input type="hidden" name="cof" value="FORID:11" />
            <input type="hidden" name="ie" value="UTF-8" />
        </form>
    </div>
    <div style='clear:both'></div>
</div>
<!--End menu-->   

<?
function load_menu($categories)
{
	foreach ($categories as $category)
	{
	?>
		<div class='sub_menu_item'>
			<a href='/tours/<?=$category->getid()?>/du-lich-da-nang.html'><?=$category->getname()?></a>
            <?
				$category_children = Category::getAllCategories($category->getid());
				if ($category_children)
				{
				?>
                <div class='sub_menu_con'>
                	<?
					load_menu($category_children);
					?>
                </div>
                <?
				}
			?>
		</div>
	<?
	}	
}
?>